﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WBParameter.aspx.cs" Inherits="Web.Admin.WebSiteSetting.WBParameter" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
      <script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <link href="../../Styles/Common.css" rel="stylesheet" type="text/css" />
    <script src="../../Scripts/Zebra/zebra_dialog.js" type="text/javascript"></script>
    <link href="../../Scripts/Zebra/zebra_dialog.css" rel="stylesheet" type="text/css" />
    <style type="text/css">

</style>
<script type="text/javascript">

    function HelpOpen() {
        $('#divHelp').fadeIn();
    };

    function HelpClose() {
        $('#divHelp').fadeOut();
    };

    $(function () {
        $.ajax({
            url: 'ws.ashx?type=getWBAuthority',
            type: 'post',
            data: '',
            dataType: 'json',
            success: function (r) {
                $('#WBID').val(r[0].ID);

                if (r[0].Enable_Distance) {
                    $("input[name=Enable_Distance]").attr("checked", "checked");
                }

                if (r[0].ErrorLogin_Admin) {
                    $("input[name=ErrorLogin_Admin]").attr("checked", "checked");
                }
                if (r[0].ErrorLogin_User) {
                    $("input[name=ErrorLogin_User]").attr("checked", "checked");
                }

                if (r[0].Price_PrintOnCunZhe) {
                    $("input[name=Price_PrintOnCunZhe]").attr("checked", "checked");
                }
                if (r[0].ISPrintIDCard) {
                    $("input[name=ISPrintIDCard]").attr("checked", "checked");
                }
                if (r[0].ISPrintPhoneNo) {
                    $("input[name=ISPrintPhoneNo]").attr("checked", "checked");
                }


                if (r[0].VerifyType == "1") {
                    $("input[name=VerifyType]").attr("checked", "checked");
                }
               
                if (r[0].InterestType == 1) {
                  
                    //                    $("input[name=InterestType]:eq(1)").attr("checked", "checked");
                    $('#InterestType1').attr("checked","checked");
                } else {
                    //                    $("input[name=InterestType]:eq(2)").attr("checked", "checked")
                   
                    $('#InterestType2').attr("checked", "checked");
                }

                $("input[name=LimitMin]").val(r[0].LimitMin);

            }, error: function (r) {
                $.Zebra_Dialog('<strong>加载信息失败 ！</strong>');
            }
        });
    });

    function SetWBAuthority() {

        if (confirm("您确认已经检查网点设置并保存吗？")) {
            var ID = $('#WBID').val();

            $.ajax({
                url: 'ws.ashx?type=UpateWBAuthority&ID=' + ID,
                type: 'post',
                data: $('#form1').serialize(),
                dataType: 'text',
                success: function (r) {
                    $.Zebra_Dialog('<strong>保存设置成功 ！</strong>');
                }, error: function (r) {
                    $.Zebra_Dialog('<strong>保存设置失败 ！</strong>');
                }
            });
        }
    }

    
</script>
</head>
<body>
   <form id="form1" runat="server">
<div class="pageHead" style="width:300px;">
<b>网点其他参数设置</b><%--<span style="cursor:pointer" onclick="HelpOpen();">帮助</span>--%>
</div>
<div id="divHelp" style="border:1px solid #333; border-radius:5px; display:none; ">
<div style="float:right; margin:10px 20px;"><input type="button"  value="关闭" onclick="HelpClose();" /></div>
<span>提示1：</span><br />
<span>提示2：</span><br />
<span>提示3：</span><br />
</div>

   
    <div  id="divfrm" class="pageEidtInner" >
 
    <div>
        <table >
            <tr>
                <td ><span>利息结算方式:</span><input type="radio" name="InterestType" id="InterestType1" value="1" checked="checked"/>按天结算利息
                &nbsp; &nbsp; &nbsp;<input type="radio" name="InterestType" id="InterestType2" value="2"/>按月结算利息
                </td>
            </tr>
             <tr>
                <td ><span>启用密码验证:</span><input type="checkbox" name="VerifyType" /></td>
            </tr>
            <tr>
                <td ><span> 允许异地存取:</span><input type="checkbox" name="Enable_Distance" /></td>
            </tr>
            <tr>
                <td ><span> 管理员登陆验证:</span><input type="checkbox" name="ErrorLogin_Admin" /></td>
            </tr>
            <tr>
                <td ><span> 营业员登陆验证:</span><input type="checkbox" name="ErrorLogin_User" /></td>
            </tr>
            
            <tr>
                <td ><span> 在存折上打印价格政策:</span><input type="checkbox" name="Price_PrintOnCunZhe" /></td>
            </tr>
            <tr>
                <td ><span> 在存折上打印身份证号:</span><input type="checkbox" name="ISPrintIDCard" /></td>
            </tr>
            <tr>
                <td ><span> 在存折上打印手机号:</span><input type="checkbox" name="ISPrintPhoneNo" /></td>
            </tr>
               <tr>
            <td ><input type="button" id="btnUpdate" value="保存设置" onclick="SetWBAuthority()" />
           
             </td>
            </tr>
        </table>
        </div>
    </div>

    </form>
    <%--定义编号--%>
    <input type="hidden" id="WBID" value="" />
    <%--定义背景色的隐藏域--%>
    <input type="hidden" id="colorName" value="" />
</body>
</html>